package service.impl;

import java.util.UUID;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import dao.CustomerDao;
import pojo.Customer;
import service.CustomerManager;
@Service(value="customerManager")
public class CustomerManagerImpl implements CustomerManager{
	@Resource(name="customerDao")
	private CustomerDao cd;
	@Override
	public Customer regist(Customer c) {
		c.setId(UUID.randomUUID().toString());
		return cd.addCustomer(c);
	}

	@Override
	public Customer login(String cname, String psd) {
		// TODO Auto-generated method stub
		return cd.findCustomer(cname, psd);
	}

}
